<template>
  <div class="detail">
    <nav-list></nav-list>
    <detail-swipe></detail-swipe>
    <goods-action></goods-action>
    <div class="detailmain">
      <h1>￥{{ data.originprice }}.00</h1>
      <p>{{ data.proname }}</p>
    </div>
  </div>
</template>

<script>
import { getDetail } from "../api/home";
import NavList from "../components/Detail/NavList.vue";
import GoodsAction from "../components/Detail/GoodsAction.vue";
import DetailSwipe from "../components/Detail/DetailSwipe.vue";
export default {
  data() {
    return {
      data: [],
    };
  },
  components: {
    NavList,
    GoodsAction,
    DetailSwipe,
  },
  methods: {},
  mounted() {},
  created() {
    getDetail(this.$route.params.proid).then((data) => {
      console.log(data.data.data);
      this.data = data.data.data;
    });
  },
};
</script>

<style scoped>
h1 {
  color: red;
}
</style>